<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="BaseDAO.*,Entity.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'zhuce1test.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
   <%
    request.setCharacterEncoding("utf-8");
    String sname=request.getParameter("name");
    String pass=request.getParameter("pwd");
    int stuno=Integer.parseInt(request.getParameter("stuno"));
    String[] grade=request.getParameterValues("grade");
    int gradeid= Integer.parseInt(grade[0]);
     %>
   
     <table>
     <tr><td>姓名</td><td><%=sname %></td></tr>
     <tr><td>学号</td><td><%=stuno %></td></tr>
     <tr><td>密码</td><td><%=pass %></td></tr>
     <tr><td>年级</td><td><%=gradeid %></td></tr>
     </table>
      <%
     JDBCUtils.zhuce(stuno, sname, gradeid, pass);
     out.print("注册成功！");
      %>
  </body>
</html>
